This invention relates to an apparatus for controlling an internal combustion engine of spark ignition type, and more particularly to an apparatus suitable for detecting the rotation speed of an internal combustion engine such as a gasoline engine for automobiles.
In a gasoline engine for automobiles, the rotation speed of the engine is used in many cases as a data required for attainment of various controls including the control of the amount of fuel supplied to the engine.
Various methods for obtaining data of the engine rotation speed have been proposed hitherto and put into practical use. According to one of the known methods, the period of a voltage waveform appearing at the minus or negative terminal on the primary side of an ignition coil is measured, and the engine rotation speed is computed on the basis of the measured period of the voltage waveform.
However, the voltage waveform appearing at the primary side of the ignition coil includes generally considerably large fluctuations similar to chattering commonly known in the art, as shown in FIG. 1 (A). (The waveform fluctuations described above will be referred to hereinafter as chattering.) Therefore,when such a voltage waveform is shaped intact into a pulse signal as shown in FIG. 1 (B), a wrong period, as indicated by T' in FIG. 1 (B), will be measured, although an ignition timing interval T as shown in FIG. 1 (A) is the correct period.
A prior art practice which obviates such a trouble comprises shaping an output signal a of a signal source 101 such as an ignition coil into a pulse signal b by a ve shaping circuit 102, applying the pulse signal b to a one-shot multivibrator (abbreviated hereinafter as an OSM) 103, counting the output signal c of the OSM 103 by a counter 104, and measuring the period T on the basis of the output signal d of the counter 104. The symbol .tau. shown in FIG. 1 (C) designates the time constant of the OSM 103.
Thus, according to the prior art practice described above, the time constant .tau. of the OSM 103 acts to provide a masking period of time, that is, it exhibits a function of ignoring the pulses of the pulse signal b appearing in this masking period of time, so that the correct period T can be measured.
However, in the prior art practice in which the time constant of the OSM 103 is used to determine the masking period of time, no consideration is given to the fact that the time constant of the OSM 103 tends to be adversely affected by the accuracy, temperature dependence and secular variation of the circuit constant of the OSM 103.
On the other hand, a method has also been proposed in which the masking period of time is continuously changed by means of software. According to this method, the masking period of time at one ignition timing can be determined on the basis of the result of detection of the period T immediately before that timing.
An apparatus based on the latter method described above is disclosed in, for example, Japanese Patent Application No. 61-119250 (1986). In the disclosed apparatus, the length of the masking period of time is continuously changed depending on the engine rotation speed.
In the case of the former of the two period art methods described above, the accuracy of the masking period of time cannot be sufficiently maintained, and changes in the operating state of the engine are not taken into consideration. On the other hand, in the case of the latter method, a complex logic circuit is required so as to continuously determine the masking period of time which meets the operating state of the engine, but no consideration is given to the fact that a satisfactorily quick response cannot be ensured due to the requirement for provision of the complex logic circuit. Thus, when changes in the operating state of the engine are considered, both of these prior art methods have been difficult to detect the engine rotation speed with high accuracy without regard to the changes in the operating state of the engine.